// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.entity;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fowo.api.common.annotaion.*;
import com.fowo.api.common.mybatis.handlers.SysFileListTypeHandler;
import com.fowo.api.sys.entity.*;
import com.fowo.api.sys.entity.SysFile;
import com.fowo.api.sys.rd2.annotation.RoleData2;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serializable;
import java.util.List;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

/**
 * QualityCheckStorage
 */
@DS("ds24")
@Getter
@Setter
@TableName(value = "quality_check_storage", autoResultMap = true)
@Schema(title = "质检单")
@RoleData2(groupId = 11, funcKey = "QualityCheckStorage")
public class QualityCheckStorage implements Serializable {

  /**
   * 编号
   */
  @TableField(value = "`id`")
  @TableId(type = IdType.ASSIGN_ID)
  @Schema(title = "编号")
  private Long id;

  /**
   * 质检单号
   */
  @TableField(value = "`qc_sn`")
  @Schema(title = "质检单号")
  private String qcSn;

  /**
   * 图片
   */
  @TableField(
    value = "`product_img`",
    typeHandler = SysFileListTypeHandler.class
  )
  @Schema(title = "图片")
  private List<SysFile> productImg;

  /**
   * 品名
   */
  @TableField(value = "`product_name`")
  @JoinField(Product.class)
  @Schema(title = "品名")
  private Long productName;

  /**
   * SKU
   */
  @TableField(value = "`sku`")
  @Schema(title = "SKU")
  private String sku;

  /**
   * 店铺
   */
  @TableField(value = "`shop`")
  @JoinField(ShopInfo.class)
  @Schema(title = "店铺")
  private Long shop;

  /**
   * FNSKU
   */
  @TableField(value = "`fnsku`")
  @Schema(title = "FNSKU")
  private String fnsku;

  /**
   * 采购单号
   */
  @TableField(value = "`purchase_code`")
  @JoinField(PurchaseOrder.class)
  @Schema(title = "采购单号")
  private Long purchaseCode;

  /**
   * 采购员
   */
  @TableField(value = "`buyer_name`")
  @JoinField(SysUser.class)
  @Schema(title = "采购员")
  private Long buyerName;

  /**
   * 收货人
   */
  @TableField(value = "`receive_name`")
  @JoinField(SysUser.class)
  @Schema(title = "收货人")
  private Long receiveName;

  /**
   * 仓库
   */
  @TableField(value = "`warehouse`")
  @JoinField(Warehouse.class)
  @Schema(title = "仓库")
  private Long warehouse;

  /**
   * 供应商
   */
  @TableField(value = "`supplier`")
  @JoinField(Supplier.class)
  @Schema(title = "供应商")
  private Long supplier;

  /**
   * 到货时间
   */
  @TableField(value = "`receive_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "到货时间")
  private java.util.Date receiveTime;

  /**
   * 质检量
   */
  @TableField(value = "`product_receive_num`")
  @Schema(title = "质检量")
  private Long productReceiveNum;

  /**
   * 质检方式 (0 - 抽检; 1 - 全检; )
   */
  @TableField(value = "`qc_method_type`")
  @Schema(title = "质检方式")
  private String qcMethodType;

  /**
   * 抽检合格率
   */
  @TableField(value = "`qc_rate_pass`")
  @Schema(title = "抽检合格率")
  private java.math.BigDecimal qcRatePass;

  /**
   * 良品量
   */
  @TableField(value = "`product_good_num`")
  @Schema(title = "良品量")
  private Integer productGoodNum;

  /**
   * 次品量
   */
  @TableField(value = "`product_bad_num`")
  @Schema(title = "次品量")
  private Integer productBadNum;

  /**
   * 质检员
   */
  @TableField(value = "`qc_name`")
  @JoinField(SysUser.class)
  @Schema(title = "质检员")
  private Long qcName;

  /**
   * 质检时间
   */
  @TableField(value = "`qc_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "质检时间")
  private java.util.Date qcTime;

  /**
   * 创建时间
   */
  @TableField(value = "`create_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "创建时间")
  private java.util.Date createTime;

  /**
   * 备注
   */
  @TableField(value = "`remark`")
  @Schema(title = "备注")
  private String remark;

  /**
   * 质检状态 (0 - 质检中; 1 - 待审批; 2 - 已完成; 3 - 已撤销; 4 - 以免检; )
   */
  @TableField(value = "`qc_status`")
  @Schema(title = "质检状态")
  private String qcStatus;

  /**
   * 打印状态 (0 - 未打印; 1 - 已打印; )
   */
  @TableField(value = "`is_print`")
  @Schema(title = "打印状态")
  private String isPrint;

  /**
   * 商品标签
   */
  @TableField(value = "`product_label`")
  @Schema(title = "商品标签")
  private String productLabel;

  /**
   * 收货单号
   */
  @TableField(value = "`delivery_order_sn`")
  @Schema(title = "收货单号")
  private String deliveryOrderSn;

  /**
   * 快捷入库下推
   */
  @TableField(value = "`entry_library`")
  @Schema(title = "快捷入库下推")
  private Integer entryLibrary;

  /**
   * 创建人
   */
  @TableField(value = "`create_user`")
  @Schema(title = "创建人")
  private Long createUser;

  /**
   * 更新时间
   */
  @TableField(value = "`last_update_time`")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  @Schema(title = "更新时间")
  private java.util.Date lastUpdateTime;

  /**
   * 更新人
   */
  @TableField(value = "`last_update_user`")
  @Schema(title = "更新人")
  private Long lastUpdateUser;

  /**
   * 删除标记
   */
  @TableField(value = "`del_flag`")
  @TableLogic
  @Schema(title = "删除标记")
  private Boolean delFlag;

  /**
   * 目标表ID列
   */
  @TableField(value = "`parent_id`")
  @Schema(title = "目标表ID列")
  private String parentId;

  /**
   * 待检量
   */
  @TableField(value = "`no_qc_num`")
  @Schema(title = "待检量")
  private Long noQcNum;

  /**
   * 抽检量
   */
  @TableField(value = "`product_qc_num`")
  @Schema(title = "抽检量")
  private Integer productQcNum;

  /**
   * 抽检次品量
   */
  @TableField(value = "`qc_bad_num`")
  @Schema(title = "抽检次品量")
  private Integer qcBadNum;

  /**
   * 抽检比例
   */
  @TableField(value = "`qc_rate`")
  @Schema(title = "抽检比例")
  private java.math.BigDecimal qcRate;

  /**
   * 总良品量
   */
  @TableField(value = "`all_product_good_num`")
  @Schema(title = "总良品量")
  private Integer allProductGoodNum;

  /**
   * 总次品量
   */
  @TableField(value = "`all_product_bad_num`")
  @Schema(title = "总次品量")
  private Integer allProductBadNum;

  /**
   * 可用仓位
   */
  @TableField(value = "`whb_code_good_id`")
  @JoinField(WarehouseBin.class)
  @Schema(title = "可用仓位")
  private Long whbCodeGoodId;

  /**
   * 次品仓位
   */
  @TableField(value = "`whb_code_bad_id`")
  @JoinField(WarehouseBin.class)
  @Schema(title = "次品仓位")
  private Long whbCodeBadId;

  /**
   * 质检图片
   */
  @TableField(value = "`qc_img`", typeHandler = SysFileListTypeHandler.class)
  @Schema(title = "质检图片")
  private List<SysFile> qcImg;

  /**
   * 质检附件
   */
  @TableField(
    value = "`attachment`",
    typeHandler = SysFileListTypeHandler.class
  )
  @Schema(title = "质检附件")
  private List<SysFile> attachment;

  /**
   * 收货单子表ID
   */
  @TableField(value = "`receipt_product_id`")
  @JoinField(ReceiptProduct.class)
  @Schema(title = "收货单子表ID")
  private Long receiptProductId;

  /**
   * 收货单号
   */
  @TableField(value = "`order_sn`")
  @Schema(title = "收货单号")
  private String orderSn;

  /**
   * 单据状态 (0 - 质检中; 1 - 待审批; 2 - 已完成; 3 - 已撤销; )
   */
  @TableField(value = "`status`")
  @Schema(title = "单据状态")
  private String status;

  /**
   * 上传图片
   */
  @TableField(
    value = "`upload_pictures`",
    typeHandler = SysFileListTypeHandler.class
  )
  @Schema(title = "上传图片")
  private List<SysFile> uploadPictures;

  /**
   * 待检
   */
  @TableField(value = "`wait_inspection`")
  @JoinField(WarehouseBin.class)
  @Schema(title = "待检")
  private Long waitInspection;

  /**
   * 加急
   */
  @TableField(value = "`is_urgent`")
  @Schema(title = "加急")
  private String isUrgent;

  /**
   * 模板id
   */
  @TableField(value = "`classify_id`")
  @Schema(title = "模板id")
  private String classifyId;
}
